package com.fire.modules.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.fire.modules.entity.TbUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author wuye
 */
@Mapper
@Repository
public interface TbUserDao extends BaseMapper<TbUser> {

    TbUser queryByMobile(String mobile);

    /**
     * 查询用户列表
     */
    List<TbUser> queryList(Map<String, Object> map);


    int updateByPrimaryKey(TbUser user);

    List<TbUser> queryPageList(Page<TbUser> pageUtil, Map<String, Object> map);

    TbUser selectByPrimaryKey(Long userId);

    TbUser queryObject(Long userId);

    TbUser queryObject(TbUser user);

    List<TbUser> queryListObject(TbUser user);

    int queryTotal(Map<String, Object> map);

    void save(TbUser user);

    void delete(Long userId);

    void deleteBatch(Long[] userIds);

    void updateUserStatus(Long userId);
    @Override
    Integer insert(TbUser record);


    void updatePwByUserId(TbUser tbUser);


    TbUser queryByUid(String value);

    TbUser queryWBBangd(String wbtoken, String wbopenid);

    TbUser queryQQBangd(String qqtoken, String qqopenid);


    void updateByUserCode(TbUser tbUser);

    /**
     * 获取所有用户
     * @return
     */
    List<TbUser> queryAll();


    TbUser queryOpenId(String openid);

    List<TbUser> queryAllBySort();

    List<TbUser> queryAllBySort1();




    /*--------------------------------------------------------------------------------------------------------------------*/

    int foundByOne(Integer id);
    List<TbUser> queryByOnd(Map<String, Object> map);


    int foundByTwo(Integer id);
    List<TbUser> queryByTwo(Map<String, Object> map);

    int foundByThree(Integer id);
    List<TbUser> queryByThree(Map<String, Object> map);

    int foundByFour(Integer id);
    List<TbUser> queryByFour(Map<String, Object> map);


    List<TbUser> queryByintegrallevel1(Integer integrallevel);

    List<TbUser> queryenergyvaluelevel(Integer energyvaluelevel);

    List<TbUser> queryByParentId(Integer userid);

}